<?php
define('APP_PATH', realpath(dirname(__FILE__)) . '/');
define('APP_NAME', 'mobile-api');
define('G_LOAD_AUTO', true);
require "../indexCommon.php";


$G_LOAD_PATH = array(
        APP_PATH,
        APP_PATH . "../app-user-core/",
        APP_PATH . "../app-ershou-core/",
        APP_PATH . "../app-member-core/",
        APP_PATH . "../app-zufang-core/",
        APP_PATH . "../app-search-core/",
        APP_PATH . "../app-shangpu-core/",
        APP_PATH . "../app-mobile-core/",
        APP_PATH . "../app-public-core/",
        APP_PATH . "../app-qa-core/",
        APP_PATH . "../app-haiwai-core/",
         APP_PATH . "../../search-php-sdk/search-core/",
        APP_PATH . "../app-broker-core/",
        APP_PATH . "../app-biz/",
        APP_PATH . "../app-community-core/",
        APP_PATH . "../app-user-common/",
        APP_PATH . "../app-user-util/",
        APP_PATH . "../app-dao/",
        APP_PATH . "../../system-ext/",
        APP_PATH . "../../community-service-impl/",
        SYS_PATH
);

$G_CONF_PATH = array(
        APP_PATH . "../../system-ext/config/",
        APP_PATH . "../app-dao/config/",
        APP_PATH . "../app-user-common/config/",
        APP_PATH . "../app-user-util/config/",
        APP_PATH . "../app-user-core/config/",
        APP_PATH . "../app-ershou-core/config/",
        APP_PATH . "../app-member-core/config/",
        // APP_PATH . "../../search-php-sdk/search-core/config/",
        APP_PATH . "../app-zufang-core/config/",
        APP_PATH . "../app-search-core/config/",
        APP_PATH . "../app-shangpu-core/config/",
        APP_PATH . "../app-mobile-core/config/",
        APP_PATH . "../app-public-core/config/",
        APP_PATH . "../app-mobile-api/config/",
        APP_PATH . "../app-search-core/config/",
        APP_PATH . "../app-haiwai-core/config/",
        APP_PATH . "config/",
        APP_PATH . "../config/user-common/",
        APP_PATH . "../config/" . APP_NAME . "/",
);

if(file_exists(APP_PATH . '../vendor/apf/sign/autoload.php')){
    require APP_PATH . '../vendor/apf/sign/autoload.php';
}
$apf = APF::get_instance();
$apf->set_response_class('APF_Response');
$apf->set_request_class('Mobile_Api_Request');
$apf->run();

function dump($data){
    echo "<pre>";
    print_r($data);
    echo "</pre>";
    exit;
}
